/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.cezary.butler.walili.client.mime;

import java.io.File;
import java.net.URL;

/**
 *
 * @author czarek
 */
public abstract class BaseFileNamingStrategy implements IFileNamingStrategy {

    private final File baseDir;

    public BaseFileNamingStrategy(File baseDir) {
        this.baseDir = baseDir;
    }

    @Override
    public File getBaseDir() {
        return baseDir;
    }

    @Override
    public File getOutputFile(URL url) {
        return new File(baseDir, generateName(url));
    }
}
